package com.ruoyi.club.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.club.mapper.CmsClubPhotoMapper;
import com.ruoyi.club.domain.CmsClubPhoto;
import com.ruoyi.club.service.ICmsClubPhotoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 俱乐部场馆照片Service业务层处理
 * 
 * @author miki
 * @date 2024-10-01
 */
@Service
public class CmsClubPhotoServiceImpl implements ICmsClubPhotoService 
{
    @Autowired
    private CmsClubPhotoMapper cmsClubPhotoMapper;

    /**
     * 查询俱乐部场馆照片
     * 
     * @param imgId 俱乐部场馆照片ID
     * @return 俱乐部场馆照片
     */
    @Override
    public CmsClubPhoto selectCmsClubPhotoById(Long imgId)
    {
        return cmsClubPhotoMapper.selectCmsClubPhotoById(imgId);
    }

    /**
     * 查询俱乐部场馆照片列表
     * 
     * @param cmsClubPhoto 俱乐部场馆照片
     * @return 俱乐部场馆照片
     */
    @Override
    public List<CmsClubPhoto> selectCmsClubPhotoList(CmsClubPhoto cmsClubPhoto)
    {
        return cmsClubPhotoMapper.selectCmsClubPhotoList(cmsClubPhoto);
    }

    /**
     * 新增俱乐部场馆照片
     * 
     * @param cmsClubPhoto 俱乐部场馆照片
     * @return 结果
     */
    @Override
    public int insertCmsClubPhoto(CmsClubPhoto cmsClubPhoto)
    {
        return cmsClubPhotoMapper.insertCmsClubPhoto(cmsClubPhoto);
    }

    /**
     * 修改俱乐部场馆照片
     * 
     * @param cmsClubPhoto 俱乐部场馆照片
     * @return 结果
     */
    @Override
    public int updateCmsClubPhoto(CmsClubPhoto cmsClubPhoto)
    {
        return cmsClubPhotoMapper.updateCmsClubPhoto(cmsClubPhoto);
    }

    /**
     * 删除俱乐部场馆照片对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCmsClubPhotoByIds(String ids)
    {
        return cmsClubPhotoMapper.deleteCmsClubPhotoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除俱乐部场馆照片信息
     * 
     * @param imgId 俱乐部场馆照片ID
     * @return 结果
     */
    @Override
    public int deleteCmsClubPhotoById(Long imgId)
    {
        return cmsClubPhotoMapper.deleteCmsClubPhotoById(imgId);
    }
}
